home *** CD-ROM | disk | FTP | other *** search
- function init()
- {
- if(this.objNum == 1)
- {
- this._x = _parent.obj5_mc._x - _parent.obj_space;
- }
- if(this.objNum == 2)
- {
- this._x = _parent.obj1_mc._x - _parent.obj_space;
- }
- if(this.objNum == 3)
- {
- this._x = _parent.obj2_mc._x - _parent.obj_space;
- }
- if(this.objNum == 4)
- {
- this._x = _parent.obj3_mc._x - _parent.obj_space;
- }
- if(this.objNum == 5)
- {
- this._x = _parent.obj4_mc._x - _parent.obj_space;
- }
- gof = Math.floor(Math.random() * 4) + 1;
- this.gotoAndStop(gof);
- idx = Math.floor(Math.random() * 5) + 1;
- _parent["obj" + i + "_mc"]._y = _parent["backY" + idx];
- }
- if(this.onEnterFrame == undefined)
- {
- ani_num = -1;
- this.onEnterFrame = function()
- {
- if(_parent.game_start == true)
- {
- if(this._x >= _parent.obj_endX)
- {
- if(_parent.target_mc["target" + _parent.now_target + "_mc"].objType == this._currentframe and this._y == _parent.backY3 and _parent.target_mc.gor == 0)
- {
- _parent.target_mc["target" + _parent.now_target + "_mc"].gotoAndStop(3);
- init();
- }
- else if(this._currentframe <= 4)
- {
- gof = this._currentframe + 4;
- this.gotoAndStop(gof);
- }
- }
- else if(_parent.dontMove == false)
- {
- this._x += _parent.obj_speed;
- }
- }
- ani_num++;
- if(ani_num == 0 or ani_num == 6 or ani_num == 12 or ani_num == 18)
- {
- this._xscale -= 3;
- this._yscale += 3;
- }
- if(ani_num == 3 or ani_num == 9 or ani_num == 15 or ani_num == 20)
- {
- this._xscale += 3;
- this._yscale -= 3;
- }
- if(ani_num >= 20)
- {
- ani_num = -1;
- }
- };
- }
-